package gui.curso;

import java.awt.Frame;

import javax.swing.JDialog;

public class DialogoModificarCurso extends JDialog {

	private static final long serialVersionUID = 1L;
	private PanelModificarCurso panelModificarCurso = null;
	private static DialogoModificarCurso instancia = null;
	private int id = 0;

	public static DialogoModificarCurso getInstancia(int id) {
		if (instancia == null) {
			instancia = new DialogoModificarCurso(null, "Panel Modificar Curso", id);
		}
		return instancia;
	}

	/**
	 * @param owner
	 */
	public DialogoModificarCurso(Frame owner, String titulo, int id) {
		super(owner);
		this.id = id;
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setResizable(false);
		this.setLocationRelativeTo(null);
		this.setSize(510, 448);
		this.setContentPane(getPanelModificarCurso());
		this.setLocationRelativeTo(null);
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private PanelModificarCurso getPanelModificarCurso() {
		if (panelModificarCurso == null) {
			panelModificarCurso = new PanelModificarCurso();
			panelModificarCurso.setIdModificar(id);
			panelModificarCurso.llenarCampos();
			panelModificarCurso.setLayout(null);
		}
		return panelModificarCurso;
	}

} // @jve:decl-index=0:visual-constraint="10,10"
